docs: fix Safari hash (TSL.* → id) for TSL documentation #32314
+11
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: Docs: Links in navigation sidebar do not work for some sections #32302
I’m looking at the Three.js documentation here:
In the navigation sidebar, some sections — I specifically noticed TSL and Global — contain links that point to anchors which do not exist. This makes the navigation sidebar unusable in these sections.
For example, the first entry under the TSL section is rendered as:
However, when clicking this link in Safari, the browser rewrites the URL to:
https://threejs.org/docs/#TSL.Break
This is problematic because the actual method heading has the following markup:
The element has id="Break", not id="TSL.Break", so Safari cannot jump to the correct section. As a result, all links in the TSL (and some other sections) fail to navigate properly.
Resolved this by fixing hasing in script tag
This issue appears only in Safari — Chromium-based browsers do not rewrite the hash.